package ke05;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Aufgabe4Test {

	public static void main(String[] args) throws IOException {
		
		Student s = new Student("Horst", 123, "Jura");
		
		BufferedWriter bw = new BufferedWriter(
				new FileWriter("oneStudent.txt"));
		
		s.writeData(bw);
		
		BufferedReader br = new BufferedReader(new FileReader("oneStudent.txt"));
		
		Student read = s.readData(br);
		
		System.out.println("Student name: " + read.getName());
	}

}
